<script>
  import Timer from './Timer.svelte';
  import HowTo from './HowTo.svelte';
  let audio;
  function timerEnds (e) {
    console.log(e);
    audio.play();
  }
</script>

<style>
  h1,
  h3 {
    text-align: center;
  }
</style>

<h1>Handwashing App</h1>

<Timer on:end={timerEnds} />

<HowTo />

<h3>
  <a href="#">Picture Source</a>
  <a href="#">Sound Source</a>
</h3>

<audio bind:this={audio}>
  <source src="https://github.com/phptuts/fcc-handwashing/blob/master/public/sound.wav" />
</audio>